package com.zhouzhou.fastjava.vfs;

import com.zhouzhou.fastjava.vfs.exception.VFSException;

import java.io.FileNotFoundException;
import java.io.InputStream;
import java.io.OutputStream;

public interface VFS {

    /**
     * @param file     stream
     * @param root     dir
     * @param filename
     * @return real file path
     * @throws VFSException
     */
    void store(InputStream is, String dir, String filename) throws VFSException;

    void retrieve(String uri, OutputStream os) throws VFSException, FileNotFoundException;

    InputStream retrieve(String uri) throws VFSException, FileNotFoundException;

}
